package com.ruoyi.fee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fee.mapper.WOverdueFeeRuleMapper;
import com.ruoyi.fee.domain.WOverdueFeeRule;
import com.ruoyi.fee.service.IWOverdueFeeRuleService;

/**
 * 超期费Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-30 11:41:37
 */
@Service
public class WOverdueFeeRuleServiceImpl implements IWOverdueFeeRuleService 
{
    @Autowired
    private WOverdueFeeRuleMapper wOverdueFeeRuleMapper;

    /**
     * 查询超期费
     * 
     * @param overdueFeeId 超期费主键
     * @return 超期费
     */
    @Override
    public WOverdueFeeRule selectWOverdueFeeRuleByOverdueFeeId(Long overdueFeeId)
    {
        return wOverdueFeeRuleMapper.selectWOverdueFeeRuleByOverdueFeeId(overdueFeeId);
    }

    /**
     * 查询超期费列表
     * 
     * @param wOverdueFeeRule 超期费
     * @return 超期费
     */
    @Override
    public List<WOverdueFeeRule> selectWOverdueFeeRuleList(WOverdueFeeRule wOverdueFeeRule)
    {
        return wOverdueFeeRuleMapper.selectWOverdueFeeRuleList(wOverdueFeeRule);
    }

    /**
     * 新增超期费
     * 
     * @param wOverdueFeeRule 超期费
     * @return 结果
     */
    @Override
    public int insertWOverdueFeeRule(WOverdueFeeRule wOverdueFeeRule)
    {
        wOverdueFeeRule.setCreateTime(DateUtils.getNowDate());
        return wOverdueFeeRuleMapper.insertWOverdueFeeRule(wOverdueFeeRule);
    }

    /**
     * 修改超期费
     * 
     * @param wOverdueFeeRule 超期费
     * @return 结果
     */
    @Override
    public int updateWOverdueFeeRule(WOverdueFeeRule wOverdueFeeRule)
    {
        wOverdueFeeRule.setUpdateTime(DateUtils.getNowDate());
        return wOverdueFeeRuleMapper.updateWOverdueFeeRule(wOverdueFeeRule);
    }

    /**
     * 批量删除超期费
     * 
     * @param overdueFeeIds 需要删除的超期费主键
     * @return 结果
     */
    @Override
    public int deleteWOverdueFeeRuleByOverdueFeeIds(Long[] overdueFeeIds)
    {
        return wOverdueFeeRuleMapper.deleteWOverdueFeeRuleByOverdueFeeIds(overdueFeeIds);
    }

    /**
     * 删除超期费信息
     * 
     * @param overdueFeeId 超期费主键
     * @return 结果
     */
    @Override
    public int deleteWOverdueFeeRuleByOverdueFeeId(Long overdueFeeId)
    {
        return wOverdueFeeRuleMapper.deleteWOverdueFeeRuleByOverdueFeeId(overdueFeeId);
    }

    /**
     * 查询超期费列表
     *
     * @param customerName 超期费
     * @return 超期费
     */
    @Override
    public List<WOverdueFeeRule> selectWOverdueFeeRuleListByCustomerName(String customerName)
    {
        return wOverdueFeeRuleMapper.selectWOverdueFeeRuleListByCustomerName(customerName);
    }
}
